
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Panel de Control</title>
        <?php echo stylesheet_link_tag('panel') ?>
        <?php echo stylesheet_link_tag('refrescar-colores') ?>
        <?php echo stylesheet_link_tag('style') ?>
        <?php echo stylesheet_link_tag('exception') ?>
        <?php echo stylesheet_link_tags(); ?>
        <link rel="stylesheet" type="text/css" href="/javascript/fancybox/jquery.fancybox-1.3.4.css"/>
        <?php echo javascript_include_tag('jquery-1.4.3.min') ?>
        <?php echo javascript_include_tag('fancybox/jquery.fancybox-1.3.4.pack') ?>
        <?php echo javascript_include_tag('panel/wpanel2') ?>
        <?php
        if ($controller_name == 'panel')
            echo javascript_include_tag('tiny_mce/tiny_mce');
        ?>
    </head>
    <body>
        <div>
            <div id="todo">
                <div id="cabezera">
                    <img width="32" height="32" alt="" src="../images/blank.gif" id="header-logo">
                    <h1 id="site-heading">
                        <a title="Visitar sitio web" href="#">
                            <span id="site-title">Panel de Control</span>
                        </a>
                    </h1>


                    <div id="cabezera-info">
                        <div id="user_info">
                            <p>¡Hola, <a title="Edite su perfil" href="#">admin</a>! | <a href="/login/logout/" title="Cerrar sesión">Cerrar sesión</a></p>
                        </div>

                        <div id="favorite-actions"><div id="favorite-first"><a href="/panel/nuevo_empleado/">Nueva empleado</a></div><div id="favorite-toggle"><br></div>
                            <div id="favorite-inside" style="width: 126px;">
                                <div class="favorite-action"><a href="/panel/lista_empleados/">Lista de empleados</a></div>
                                <div class="favorite-action"><a href="/panel/entrada/">Entrada</a></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="wpbody">
                    <ul id="adminmenu">
                        <?php
                        if (Auth::get('tipo') == 1) {
                            $menu["Panel"] = array("dashboard", array("Panel" => "index", "Entrada" => "entrada", "Equipos" => "lista_equipos", "Salida" => "salida", "Reporte" => "reportes", "Consulta" => "Consulta"), "separador");
                            $menu["Artistas"] = array("users", array("Artistas" => "listaArtistas", "Nuevo Artista" => "nuevoArtista"), "separador");
                        }
                        foreach ($menu as $key => $value) {
                            $i = 0;
                            $mimenu = '<li class="wp-has-submenu menu-top menu-icon-' . $value[0] . '';
                            if ($i == 0)
                                $mimenu .= ' wp-first-item menu-top-first menu-top-last';
                            if ($key == $mactual)
                                $mimenu .= ' wp-has-current-submenu wp-menu-open';
                            $mimenu .='" id="menu-' . $value[0] . '">';
                            $mimenu .= '<div class="wp-menu-image"><a href="#"><br /></a></div><div class="wp-menu-toggle"><br /></div>';
                            $mimenu .='<a href="#" class="wp-has-submenu menu-top menu-icon-' . $value[0] . '';
                            if ($i == 0)
                                $mimenu .= ' wp-first-item menu-top-first menu-top-last';
                            if ($key == $mactual)
                                $mimenu .= ' wp-has-current-submenu wp-menu-open';
                            $mimenu .= '" tabindex="1">' . $key . '</a>';
                            $mimenu .= '<div class="wp-submenu"><div class="wp-submenu-head">' . $key . '</div>';
                            $mimenu .= '<ul>';
                            foreach ($value[1] as $title => $ruta) {
                                $mimenu .= '<li class="wp-first-item';
                                if ($ruta == $action_name)
                                    $mimenu .= ' current';
                                $mimenu .= '">';
                                $mimenu .= '<a href="/panel/' . $ruta . '" class="wp-first-item';
                                if ($ruta == $action_name)
                                    $mimenu .= ' current';
                                $mimenu .= '" tabindex="1">' . $title . '</a>';
                                $mimenu .= '</li>';
                            }
                            $mimenu .= '</ul>';
                            $mimenu .= '</div></li>';
                            if ($value[2] == "separador")
                                $mimenu .= '<li class="wp-menu-separator"><a class="separator" href="?unfoldmenu=1"><br /></a></li>';
                            echo $mimenu;
                            $i++;
                        }
                        ?>
                    </ul>
                    <div id="wpbody-content">
                        <div class="wrap nosubsub">
                            <?php View::content(); ?>
                        </div>
                    </div>
                </div>
                <div id="pie"></div>
            </div>
        </div>
        <?php echo javascript_include_tag('panel/wpanel') ?>
    </body>
</html>
